package com.lhnstart.learn.bases;

import java.util.Scanner;

/**
 * scanner 测试代码
 *
 * @author lhn
 * @date 2022/11/09 12:34
 * @since 1.0.0
 **/
public class ScannerDemo {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("What is you name?");
        String name = scanner.nextLine();
        System.out.println("How old are you?");
        int age = scanner.nextInt();
        System.out.println("name :" + name + "+++ age:" + age);
        String next = scanner.next();
        System.out.println(next);

    }

}